<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <h2 th:utext="${msg}"></h2>
<div th:Object="${user}" th:with="age=${user.age}+10">
        <h1 th:text="*{name}"></h1>
        <h1 th:text="*{age}"></h1>
        <h1 th:text="*{friend.name}"></h1>
        <h1 th:text="*{friend.age}"></h1>
    <h1 th:text="${age}"></h1>
</div>
</body>
</html>